<template>
  <div>
    {{ parentTitle }}
    <!--    <ChildComponent :title.sync="parentTitle" />-->
    <!-- 等价写法 -->
    <ChildComponent :title="parentTitle" @update:title="parentTitle = $event"/>

    <!-- 多个属性的用法 -->
    <child :text.sync="text" :value.sync="value"/>
    {{ text }} -- {{ value }}
  </div>
</template>

<script>
import ChildComponent from './components/ChildComponent.vue'
import Child from '@/views/form/components/Child.vue'

export default {
  components: {
    Child,
    ChildComponent
  },
  data() {
    return {
      parentTitle: 'Hello from Parent',
      text: '',
      value: ''
    }
  }
}
</script>
